#define _CRT_SECURE_NO_WARNINGS 2
#include<iostream>
#include<bitset>
#include<vector>
using namespace std;

namespace Bitset {
	template<size_t N>
	class bitset {
	protected:
		vector<int> _bs;

	public:
		bitset() {
			_bs.resize(N / 32 + 1);
		}
	public:
		void set(size_t val) {
			size_t i = val / 32;
			size_t j = val % 32;
			_bs[i] |= (1 << j);
		}

		void reset(size_t val) {//set 0
			size_t i = val / 32;
			size_t j = val % 32;
			_bs[i] &= (~(1 << j));
		}

		bool test(size_t val) {
			size_t i = val / 32;
			size_t j = val % 32;
			return _bs[i] & (1 << j);
		}


	};

	template<size_t N>
	class TwoBitSet {
	protected:
		bitset<N> _bs1;
		bitset<N> _bs2;

	public:
		void set(size_t val) {
			if (!_bs1.test(val) && !_bs2.test(val)) {//00 -> 01
				_bs2.set(val);
			}
			else if (!_bs1.test()&&_bs2.test(val)) {//01 -> 10 appear  2 times
				_bs1.set(val);
				_bs1.reset(val);
			}
			else {//appear more 2 times
				_bs1.set(val);
				_bs2.set(val);
			}
		}
	};

}

void think() {
	cout << INT32_MAX << endl;
}
//
//int main() {
//	think();
//	Bitset::bitset<442> bs;
//	int a[] = { 1,3,4,5,8,44,442,87,34,10 };
//	for (auto e : a) {
//		bs.set(e);
//	}
//	bs.reset(44);
//	bs.reset(87);
//	cout << bs.test(1) << endl;
//	cout << bs.test(3) << endl;
//	cout << bs.test(4) << endl;
//	cout << bs.test(441) << endl;
//	cout << bs.test(44) << endl;
//	cout << bs.test(87) << endl;
//
//	
//	return 0;
//}

int main() {
	bitset<10> bs;
	cout << bs.size() << endl;
	bs.set(12);
	return 0;
}